<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
	<title>系统任务管理</title>
	<script type="text/javascript" src="../../../js/boot.js"></script>
</head>

<body>
	<div style="width:100%;height:99%;">
		<fieldset id="fd1" style="width: 97%; margin-bottom: 10px;">
			<legend><span>查询条件</span></legend>
			<div id="queryForm" class="fieldset-body">
				<table class="form-table" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td class="form-label">
							<span>日期从：</span>
							<input id="startTime_from" name="startTime_from" class="mini-datepicker" format="yyyy-MM-dd HH:mm:ss" timeFormat="HH:mm:ss"
								showTime="true" style="width: 150px" />
							<span>到：</span>
							<input id="endTime_to" name="endTime_to" class="mini-datepicker" format="yyyy-MM-dd HH:mm:ss" timeFormat="HH:mm:ss"
								showTime="true" style="width: 150px" />
							<a style="margin: 0 0 0 0;" class="mini-button" iconCls="icon-search" onclick="search()">查询</a>
						</td>
					</tr>
				</table>
			</div>
		</fieldset>

		<div class="mini-fit">
			<div id="datagrid" class="mini-datagrid" style="width:100%;height:100%;" pageSize="20" idField="instID" allowResize="true" multiSelect="true">
				<div property="columns">
					<div type="indexcolumn" width="20"></div>
					<div field="logID" visible="false"></div>
					<div field="taskInformation" width="100" headerAlign="center">任务说明</div>
					<div field="startTime" width="40" headerAlign="center" dateFormat="yyyy-MM-dd HH:mm:ss" allowSort="true">开始执行时间</div>
					<div field="endTime" width="40" headerAlign="center" dateFormat="yyyy-MM-dd HH:mm:ss" allowSort="true">结束执行时间</div>
					<div field="result" width="40" headerAlign="center">执行结果</div>
					<div field="message" width="100" headerAlign="center">详细信息</div>
				</div>
			</div>
		</div>
	</div>

</body>

<script type="text/javascript">
	miniInit();

	var queryForm = new mini.Form("#queryForm");

	var datagrid = mini.get("datagrid");
	datagrid.set({
		url: http.getUrl("/com/map/page.do?tableName=AD_TASK_LOG&taskType=2")
	});

	function search() {
		var data = queryForm.getData(true, false);
		data.orderBy = "startTime desc";
		datagrid.load(data, null, miniui.showLoadErrorMessageBox);
	}
</script>

</html>